home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-05-11 | 1.0 KB | 23 lines | [TEXT/MMCC] |
- How to use:
-
- Should I use it as a standalone code resource or link it into my INIT?
-
- I recommend linking the code to your INIT resource, because it's easier and cleaner, *provided* that your INIT resource is
- written properly, that is, it is destroyed once startup is over. If your INIT installs trap patches, then the code for the trap
- patches should be compiled into a separate resource (or code fragment, on the PowerPC) and only the code for the patches
- should remain resident. Filling the System heap with old INIT code isn't cool.
-
- If you decide to use this code as a standalone resource, here is a snippet that shows how to load and call it:
-
- Handle theResource;
-
- theResource = Get1Resource('Code', 7000);
- if (theResource)
- ((pascal void (*) (short, Boolean)) *theResource) (myIconFamilyID, true);
-
- Note that I don't call HLock because the resource is marked as Locked, and I don't call ReleaseResource because the
- INIT resource file is going to be closed after the INIT executes, unloading all resources.
-
- François Pottier <pottier@dmi.ens.fr>
- May 11th, 1995
-